/*
 * CDPSTrinket.java
 * 
 * Copyright (c) 2009 Giles Millward (Manigra). All rights reserved.
 * 
 * This file is part of JRogueDPS.
 * 
 * JRogueDPS is free software: you can redistribute it and/or modify
 * it under the terms of the GNU General Public License as published by
 * the Free Software Foundation, either version 3 of the License, or
 * (at your option) any later version.
 * 
 * JRogueDPS is distributed in the hope that it will be useful,
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 * GNU General Public License for more details.
 * 
 * You should have received a copy of the GNU General Public License
 * along with JRogueDPS.  If not, see <http://www.gnu.org/licenses/>.
 */

package dpsinterface;

import geardatabase.CItem;
import geardatabase.CProcItem;
import java.util.ArrayList;
import jroguedps.CGlobal;
import paperdoll.CDollSlotType.DollSlotType;

/**
 *
 * @author Giles Millward (Manigra)
 */
public class CDPSTrinket {
    public ArrayList<CProcItem> m_procItems = new ArrayList<CProcItem>();

    CDPSTrinket(CDPSInterface p_dpsInterface)
    {
        addTrinket(DollSlotType.TRINKET1);
        addTrinket(DollSlotType.TRINKET2);
    }
    
    private void addTrinket(DollSlotType p_slotType)
    {
        CItem l_item = CGlobal.g_paperDoll.getSlot(p_slotType).getItem();
        CProcItem l_procItem = CGlobal.g_procDatabase.getProcItem(l_item.getId());
        if (l_procItem == null)
        {
            // No modelled trinket
            return;
        }

        m_procItems.add(l_procItem);
    }
}
